#!/usr/bin/env python3
# -*- coding: utf-8 -*-
print('#############循环#############')
print('#############for...in循环#############')
names = ['mike', 'lisa', 'selina']
for temp in names:
    print(temp)
print('#############range()函数#############')
print(range(10))
print('#############list()函数#############')
print(list(range(20)))
print('#############1到100累加和#############')
sum = 0
for temp in list(range(100)):
    sum = sum + temp + 1
print(sum)
print('#############while循环，累加100以内的奇数#############')
sum = 0
n = 101
while n - 2 > 0:
    n = n - 2
    sum = sum + n
print(sum)
print('#############循环中的break#############')
n = 10
for temp in list(range(n)):
    if temp == 6:
        break
    print(temp)
print('#############循环中的continue#############')
for temp in list(range(n)):
    if temp == 6:
        continue
    print(temp)

print('#############for循环，逆序，步长#############')
for temp in range(10, 0, -1):
    print(temp)
